# include<stdio.h>

int main()
{
	int user_value = 0;
	int hundreds, tens, ones, out;
	
	scanf("%d", &user_value);
	hundreds = user_value / 100;
	tens = (user_value % 100) / 10;
	ones = (user_value % 100) % 10;
	
	out = ones * 100 + tens * 10 + hundreds;
	
	printf("%d", out);
	
	return 0;
}
